<?php
	$linkStart 		= $this->currentUrl . '/page/' . $this->first;
	$linkPrevious 	= $this->currentUrl . '/page/' . $this->previous;
	$linkNext 		= $this->currentUrl . '/page/' . $this->next;
	$linkEnd 		= $this->currentUrl . '/page/' . $this->last;
	
	$current		= $this->current;
	$pageCount		= $this->pageCount;
	
	$strPage = '';
	foreach ($this->pagesInRange as $key){
		if( $this->current == $key ){
			$strPage .= '<span>' . $key . '</span>';
		}else{
			$linkPage = $this->currentUrl . '/page/' . $key;
			$strPage .= '<a href="javascript:void(0)" onclick="loadPageAjax(\''.$this->options['idLoad'].'\', \''.$linkPage.'\')" title="Page ' . $key . '">' . $key . '</a>';
		}
	}
	
	$page = 'Trang ' . $this->current . '/' . $this->last;
?>

<table>
	<tr>
		<td align="left">Tổng: <?php echo $this->totalItemCount;?></td>
		<td align="right">Trang<?php echo $strPage;?></td>
	</tr>
</table>
<script type="text/javascript">
	function loadPageAjax(idLoad, linkLoad){
		$('#' + idLoad).addClass('dangtai2').load(linkLoad, function(){ $(this).removeClass('dangtai2'); });
	}
</script>